<%@ page language="java" contentType="text/html; charset=UTF8" pageEncoding="UTF8"%>
<%@ include file="/jsp/base/taglibs.jsp"%>
<form action="#" id="edit-form">
<input type="hidden" name="id" value="${contract.id }" />
<table class="table">
	<tr>
		<td>雇员：</td>
		<td colspan="3">
			<input type="text" name="username" value="${contract.username }"/>
		</td>
	</tr>
	<tr>
		<td>合同编号：</td>
		<td>
			<input type="text" name="number" value="${contract.number }"/>
		</td>
		<td>类型：</td>
		<td>
			<select name="type">
                <option value="聘用合同">聘用合同</option>
				<option value="实习协议">实习协议</option>
				<option value="保密协议">保密协议</option>
				<option value="录用合同">录用合同</option>
				<option value="兼职合同">兼职合同</option>
				<option value="借调合同">借调合同</option>
				<option value="集体合同">集体合同</option>
			</select>
		</td>
	</tr>
	<tr>
		<td>签订日期：</td>
		<td>
			<input type="text" name="startTime" value='<fmt:formatDate value="${contract.startTime }" pattern="yyyy-MM-dd" />' />
		</td>
		<td>终止日期：</td>
		<td>
			<input type="text" name="endTime" value='<fmt:formatDate value="${contract.endTime }" pattern="yyyy-MM-dd" />' />
		</td>
	</tr>
	<tr>
		<td>生效日期：</td>
		<td colspan="3">
			<input type="text" name="validTime" value='<fmt:formatDate value="${contract.validTime }" pattern="yyyy-MM-dd" />' />
		</td>
	</tr>
	<tr>
		<td>是否含试用期：</td>
		<td>
			<input type="radio" name="istry" value="1"  />&nbsp;是
			&nbsp;&nbsp;&nbsp;
			<input type="radio" name="istry" value="0"  />&nbsp;否
		</td>
		<td>是否续签：</td>
		<td>
			<input type="radio" name="iscontinue" value="1"  />&nbsp;是
			&nbsp;&nbsp;&nbsp;
			<input type="radio" name="iscontinue" value="0"  />&nbsp;否
		</td>
	</tr>
	<tr>
		<td>合同内容：</td>
		<td colspan="3">
			<textarea name="content" style="width:400px;">${contract.content }</textarea>
		</td>
	</tr>
	<tr>
		<td>备注：</td>
		<td colspan="3">
			<textarea name="remark" style="width:400px;">${contract.remark }</textarea>
		</td>
	</tr>	 
	<tr>
		<td colspan="4" align="center">
			<a href="javascript:void(0)" class="btn btn-primary  " onclick="update()" >保存</a>
			<a href="javascript:void(0)" class="btn btn-default " onclick="closeModal()">取消</a>
		</td>
	</tr>
</table>
</form>
<script>
$(function() {
	var type = "${contract.type}";
	$("#edit-form select[name=type]").val(type);
	
	
	var istry = "${contract.istry}";
	$("#edit-form input[name=istry][value="+istry+"]").prop("checked", "checked");
	
	var iscontinue = "${contract.iscontinue}";
	$("#edit-form input[name=iscontinue][value="+iscontinue+"]").prop("checked", "checked");
})
</script>
